package com.xframe.domain.knowledgeBase;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xframe.domain.BaseModel;
import com.xframe.xdal.core.annotation.*;
import com.xframe.xdal.core.constant.AutoFillType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

//com.xframe.domain.knowledgeBase.KnowledgeComments
@Data
@Accessors(chain=true)
@XTable(value = "knowledge_comments", label = "知识评论")
@XHasMany(typeName = "com.xframe.domain.knowledgeBase.VReplyEmployee",foreignKey = "commentId", targetKey = "commentId",as = "replyList")
@XBelongsTo(typeName = "com.xframe.domain.knowledgeBase.SystemEmployee",foreignKey = "empId", targetKey = "id",as = "refReplyEmployee")
public class KnowledgeComments extends BaseModel {
    /**
     * 主键ID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(name = "comment_id",primaryKeyFlag = true, uniqueFlag = true,desc = "主键ID")
    private Long commentId;


    /**
     * 经验ID
     */
    @XColumn(name = "kn_id",desc = "经验ID")
    private Long knId;

    /**
     * 员工ID
     */
    @XColumn(name = "emp_id",desc = "员工ID")
    private Long empId;

    /**
     * 评论文本
     */
    @XColumn(name = "comment_text",desc = "评论文本")
    private String commentText;


//回复信息列表
    private List<VReplyEmployee> replyList;

//    评论员工信息
    private SystemEmployee refReplyEmployee;
}
